package com.gxcc3.ygps.web.controller.check;


import com.gxcc3.ygps.common.core.controller.BaseController;
import com.gxcc3.ygps.common.core.domain.AjaxResult;
import com.gxcc3.ygps.common.core.domain.entity.SysCheckDetection;
import com.gxcc3.ygps.common.core.domain.entity.SysCheckItem;
import com.gxcc3.ygps.common.core.page.TableDataInfo;
import com.gxcc3.ygps.system.service.ISysCheckItemService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 检测管理 检测列表
 */
@RestController
@RequestMapping("/check/item")
public class SysCheckItemController extends BaseController {

    @Resource
    ISysCheckItemService itemService;




    /**
     * 车辆列表
     */
    @PreAuthorize("@ss.hasPermi('check:item:list')")
    @GetMapping("/list")
    public TableDataInfo list(SysCheckItem item)
    {
        startPage();
        List<SysCheckItem> list = itemService.selectItemList(item);
        return getDataTable(list);
    }

    /**
     * 车辆列表
     */
    @PreAuthorize("@ss.hasPermi('check:item:list')")
    @GetMapping("/listAll")
    public AjaxResult listAll()
    {
        return success(itemService.selectItemListAll());
    }
}
